﻿<UserControl x:Class="VkClientIM.UI.MyProfilePresenter"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
			 xmlns:converters="clr-namespace:VkClientIM.Converters"
			 xmlns:thisUI="clr-namespace:VkClientIM.UI"
             mc:Ignorable="d" 
             d:DesignHeight="60" d:DesignWidth="300">
    <Grid>
		<Grid.Resources>
			<converters:ByteArrayToImageConverter x:Key="ArrayToImageConverter"/>
		</Grid.Resources>
		<Grid.Background>
			<LinearGradientBrush StartPoint="1,0">
				<GradientStop Color="#4CA2A2A2" Offset="0"/>
				<GradientStop Color="LightBlue" Offset="0.5"/>
				<GradientStop Color="#4CA2A2A2" Offset="1"/>
			</LinearGradientBrush>
		</Grid.Background>
		<DockPanel>
			<Border Width="60" Height="60" CornerRadius="5">
				<Border.Background>
					<LinearGradientBrush StartPoint="1,0">
						<GradientStop Color="Black" Offset="0"/>
						<GradientStop Color="Gray" Offset="0.5"/>
						<GradientStop Color="Black" Offset="1"/>
					</LinearGradientBrush>
				</Border.Background>
				<Border Margin="5,5,5,5" CornerRadius="3">
					<Border.ContextMenu>
						<ContextMenu Name="contextMenu">
							<MenuItem Header="Профиль" PreviewMouseUp="ProfileShow"/>

						</ContextMenu>
					</Border.ContextMenu>
					<Border.Background>
						<ImageBrush ImageSource="{Binding Path=Photo,Converter={StaticResource ArrayToImageConverter}}"/>
					</Border.Background>
				</Border>
				<!--<Image Margin="5,5,5,5" Source="{Binding Path=Photo,Converter={StaticResource ArrayToImageConverter}}"/>-->
			</Border>
			<StackPanel>
				<StackPanel Orientation="Horizontal">
					<TextBlock Text="{Binding Path=LastName}"/>
					<TextBlock Text=" "/>
					<TextBlock Text="{Binding Path=NickName}"/>
					<TextBlock Text=" "/>
					<TextBlock Text="{Binding Path=FirstName}"/>
				</StackPanel>
				<TextBlock Text="{Binding Path=Domain}"/>
				<DockPanel>
					<TextBlock Text="Статус"/>
					<TextBox Height="20" Text="{Binding Path=Activity,UpdateSourceTrigger=LostFocus}" HorizontalAlignment="Stretch" Background="Transparent"/>
				</DockPanel>
				
			</StackPanel>
			
		</DockPanel>
		
	</Grid>
</UserControl>
